package main

import "fmt"

func main() {
	//defer fmt.Println("first defer")
	//for i := 0; i < 3; i++ {
	//	defer fmt.Printf("defer in for [%d]\n", i)
	//}
	//defer fmt.Println("last defer")
	defer_call()
}

func defer_call(){
	defer func() {
		fmt.Println("before recover")
	}()
	//defer func() {
	//	p:=recover()
	//	fmt.Println(p)
	//}()
	defer func() {fmt.Println("after recover")}()
	fmt.Println("before panic")
	panic("panic info")

}